package com.yizhuoyan.his.webapi.controller.pharmacyoperator.vo;

import com.yizhuoyan.his.entity.HosDrugsEntity;
import lombok.Data;

@Data
public class DrugManageVo {
    /**
     * 药品编码
     */
    private String code;
    /**
     * 药品名称
     */
    private String name;
    /**
     * 药品规格
     */
    private String specification;
    /**
     * 包装单位
     */
    private String unit;
    /**
     * 生产厂家
     */
    private String manufacturer;
    /**
     * 药品剂型
     */
    private Long drugDosageId;
    /**
     * 药品类型
     */
    private Long drugTypeId;
    /**
     * 药品单价(分)
     */
    private Integer unitPrice;
    /**
     * 拼音助记码
     */
    private String mnemonic;
    public static  DrugManageVo of(HosDrugsEntity entity){
        DrugManageVo vo= new DrugManageVo();
        vo.setCode(entity.getCode());
        vo.setDrugDosageId(entity.getDrugDosageId());
        vo.setDrugTypeId(entity.getDrugTypeId());
        vo.setManufacturer(entity.getManufacturer());
        vo.setMnemonic(entity.getMnemonic());
        vo.setName(entity.getName());
        vo.setSpecification(entity.getSpecification());
        vo.setUnit(entity.getUnit());
        vo.setUnitPrice(entity.getUnitPrice());
        return  vo;
    }
}
